package com.zimmur.app.mocolink.manage.web.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.zimmur.app.mocolink.domain.util.DateUtils;
import com.zimmur.app.mocolink.domain.vo.MenuDetail;
import com.zimmur.app.mocolink.service.IMenuService;


@Controller
@RequestMapping("/home")
public class HomeController extends BaseController{
	@Autowired
	private IMenuService menuService;
	@RequestMapping("/index")
	public String index(HttpServletRequest request,ModelMap model){
		Integer adminId =getUserId();
		List<MenuDetail> menuList = menuService.selectByAdminId(adminId);
		model.addAttribute("menuList", menuList);
		model.addAttribute("dd", DateUtils.getNow());
		return "/open/index";
	}
}
